<template>
  <div class="home">
    <button type="button" @click="openPDF()">打开</button>
    <!-- <PdfPreviewer ref="pdfPreviewRef" /> -->
  </div>
</template>

<script>
// @ is an alias to /src

// import PdfPreviewer from '@/components/PdfPreviewer'

export default {
  name: 'HomeView',
  components: {
    
  },
  methods:{
    openPDF(){
      console.log('$previewer ', this.$previewer )
      // this.$nextTick(()=>{
        // this.$refs.pdfPreviewRef.openPDF()
        this.$previewer.open({
          file:{
            fileName:'turnjs4-api-docs.pdf',
          filePath:'/turnjs4-api-docs.pdf',
          downloadPath:'' //下载地址
          }
        })

      // })
    }
  }
}
</script>
